<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><s:text name="tiltle_userInfoList"></s:text></title>
<base target="_self" />
<style type="text/css">
</style>
<%@ include file="../common/header.jsp"%>
<link href="${appPath}/css/nav.css" rel="stylesheet" type="text/css" />
<link href="${appPath}/css/userInfoList.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${appPath}/js/userInfoList.js"></script>
<script type="text/javascript" src="${appPath}/js/year_month_day.js"></script>
</head>

<body>
	<div id="content">
		<p class="space2"></p>
		<h1 class="" style="background:#43B413;color:#fff;height:40px;">
			<s:if test='userForModify=="1"'>
				<s:text name="title_userInfoList"></s:text>
			</s:if>
			<s:else>
				<s:text name="tiltle_userInfoList">
				</s:text>
			</s:else>
			&nbsp;&nbsp;&nbsp;&nbsp;
		</h1>
		<s:fielderror fieldName="textOverLimit"></s:fielderror>
		<s:fielderror fieldName="usernameMult"></s:fielderror>
		
		<s:form action="" id="userForm" enctype="multipart/form-data" method="post">
			<table class="userTable" style="background: white; width: 860px; margin-left: auto; margin-right: auto;">

				<tr>
					<td height="50px" width="30%" align="right" class="font1"><s:text name="label_accout"></s:text></td>
					<td height="50px" width="40%" align="left"><s:if test='userForModify=="1"'>
							<!--<s:label  name="email" cssClass="emailTxt"></s:label>-->
							<s:textfield type="text" readonly="true" cssClass="sTxt" id="username" value="%{username}" name="username"
								onfocus="this.blur()" />
							<font color="red">*</font>
						</s:if> <s:else>
							<s:textfield type="text" cssClass="sTxt" id="username" value="%{username}" name="username" maxlength="50"
								onblur="multCheck()" />
							<font color="red">*</font>
						</s:else></td>
					<td align="left"><span id="usernameWarm"><s:fielderror fieldName="username"
								cssClass="errormessage"></s:fielderror> </span></td>
				</tr>
				<tr>
					<td height="50px" align="right" class="font1"><s:text name="label_password"></s:text></td>
					<td height="50px" align="left"><s:textfield type="password" cssClass="sTxt" id="password" value="%{password}"
							name="password" maxlength="20" onblur="insertPassword()" /><font color="red">*</font></td>
					<td align="left"><span id="passwordwarm"> <s:fielderror fieldName="password"
								cssClass="errormessage"></s:fielderror>
					</span></td>

				</tr>
				<tr>
					<td height="50px" align="right" class="font1"><s:text name="label_passwordCheck"></s:text></td>
					<td height="50px" align="left"><s:textfield type="password" cssClass="sTxt" id="passwordSure"
							name="passwordSure" maxlength="20" onblur="insertAgain()" /><font color="red">*</font></td>
					<td align="left"><span id="passwordSurewarm"> <s:fielderror fieldName="passwordSure"
								cssClass="errormessage"></s:fielderror>
					</span></td>
				</tr>
				<tr>
					<td height="50px" align="right" class="font1">姓名</td>
					<td height="50px" align="left"><s:textfield type="text" cssClass="sTxt" id="realname" name="realname"
							value="%{realname}" maxlength="20" /></td>
					<td align="left"><span id="realnamewarm"> <s:fielderror fieldName="realname"
								cssClass="errormessage"></s:fielderror>
					</span></td>
				</tr>
				<tr>
					<td height="50px" align="right" class="font1">邮箱</td>
					<td height="50px" align="left"><s:textfield type="text" cssClass="sTxt" id="email" name="email"
							value="%{email}" maxlength="20" /></td>
					<td align="left"><span id="emailwarm"> <s:fielderror fieldName="email"
								cssClass="errormessage"></s:fielderror>
					</span></td>
				</tr>

				<tr>
					<td height="100px" align="center" colspan="3"><s:if test='userForModify=="1"'>
							<input type="button" id="btnEdit" value="<s:text name="label_modify"></s:text>" class="button1" style="width:300px;"/>
						</s:if> <s:else>
							<input type="button" id="btnSave" value="<s:text name="label_registerButton"></s:text>" class="button1" style="width:300px;"/>
						</s:else></td>
				</tr>
			</table>

			<s:hidden id="usernameAgainMsg" value="%{getText('label_usernameAgainMsg')}" name=""></s:hidden>
			<s:hidden id="passwordSureErrorMsg" value="%{getText('label_passwordSureErrorMsg')}" name="passwordSureErrorMsg"></s:hidden>
		</s:form>
	</div>
<%@ include file="footer.jsp"%>
	<p class="space1"></p>
	<script type="text/javascript">
		$(function() {
			var selYear = window.document.getElementById("selYear");
			var selMonth = window.document.getElementById("selMonth");
			var selDay = window.document.getElementById("selDay");
			var modifyflag = "<s:property value="userForModify"/>";
			var dt;
			if (modifyflag == "1") {
				dt = new Date("<s:property value="selYear"/>", "<s:property value="selMonth"/>" - 1, "<s:property value="selDay"/>");
			} else {
				dt = new Date();
			}

			new DateSelector(selYear, selMonth, selDay, dt);
		});
	</script>
</body>
</html>